<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script type="text/javascript">
			var a=10;
			alert (a);
			{/**
			 * 代码块
			 * 
			 */
			let a=20;
			alert(a);/*  let定义一个变量，代码块就失效*/
				
			}
			alert(a);
			
			var color=["red","blue","black"]
			alert(color);
			alert(color[2])
			
			//方法
			function add(a,b){
				return a+b;
			}
			alert(add(5,5));
			
			console.log(a);
		</script>
	</head>
	<body>
	</body>
</html>
